char *strcat(char *s, const char *append);
char *strncat(char *s, const char *append, size_t count);
int strcmp(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, size_t count);
char *strcpy(char *to, const char *from);
char *strncpy(char *to, const char *from, size_t count);
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
size_t strspn(const char *s1, const char *s2);
size_t strcspn(const char *s1, const char *s2);
char *strpbrk(const char *s1, const char *s2);
char *strstr(const char *s1, const char *s2);
char *strtok(char *s1, const char *s2);
int strncasecmp(char *s1, char *s2, size_t count);
char *index(const char *s, int c);
char *rindex(const char *s, int c);
Strcat appends a copy of string append to the end of string s. Strncat copies at most count characters. Both return a pointer to the null-terminated result.
Strcmp compares its arguments and returns an integer greater than, equal to, or less than 0, according as s1 is lexicographically greater than, equal to, or less than s2. Strncmp makes the same comparison but looks at at most count characters.
Strcpy copies string from to to, stopping after the null character has been moved. Strncpy copies exactly count characters, appending nulls if from is less than count characters in length; the target may not be null-terminated if the length of from is count or more. Both return to.
Strchr locates the first occurrence of c in the string pointed to by s. The terminating null character is not considered to be part of the string. Strchr returns a pointer to the located character, or a null pointer if the character does not occur in the string.
Strrchr locates the last occurrence of c in the string pointed to by s. The terminating null character is not considered to be part of the string. Strrchr returns a pointer to the located character, or a null pointer if the character does not occur in the string.
Strspn computes the length of the maximum initial segment of the string pointed to by s1 which consists entirely of characters from the string pointed to by s2. Strspn returns the length of the segment.
Strcspn computes the length of the maximum initial segment of the string pointed to by s1 which consists entirely of characters not from the string pointed to by s2. Strcspn returns the length of the segment.
Strpbrk locates the first occurrence in the string pointed to by s1 of any character from the string pointed to by s2. Strpbrk returns a pointer to the character, or a null pointer if no character from s2 occurs in s1.
Strstr locates the first occurrence in the string pointed to by s1 of the sequence of characters (excluding the terminating null character) in the string pointed to by s2. Strstr returns a pointer to the located string, or a null pointer if the string is not found. If s2 points to a string with zero length, s1 is returned.
A sequence of calls to strtok breaks the string pointed to by s1 into a sequence of tokens, each of which is delimited by a character from the string pointed to by s2. The first call in the sequence has s1 as its first argument, and is followed by calls with a null pointer as their first argument. The separator string pointed to by s2 may be different from call to call.
The first call in the sequence searches the string pointed to by s1 for the first character that is not contained in the current separator string pointed to by s2. If no such character is found, then there are no tokens in the string pointed to by s1 and strtok returns a null pointer. If such a character is found, it is the start of the first token.
Strtok then searches from there for a character that is contained in the current separator string. If no such character is found, the current token extends to the end of the string pointed to by s1, and subsequent searches for a token will return a null pointer. If such a character is found, it is overwritten by a null character, which terminates the current token. Strtok saves a pointer to the following character, from which the next search for a token will start.
Each subsequent call, with a null pointer as the value of the first argument, starts searching from the saved pointer and behaves as described above.
Strtok returns a pointer to the first character of a token, or a null pointer if there is no token.
Strlen returns the number of non-null characters in s.
The index and rindex functions are equivalent to strchr and strrchr, respectively.